<template>
  <div id='DetailShopinfo'>
    <div class="shoplogo">
      <img :src="shopinfo.logo" alt="">
      <span>{{shopinfo.name}}</span>
    </div>
    <div class="tatlescore">
      <div class="sell">
        <span>总销量</span><span>总宝贝</span>
      </div>
      <div class="score">
        <div v-for="item in shopinfo.score" class="score-item">
          <span class="score-text">{{item.name}}</span>
          <span class="green" :class="{red:item.isBetter}">{{item.score}}</span>
          <span class="green" :class="{red:item.isBetter}">{{item.isBetter ? "高" : "低"}}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'DetailShopinfo',
    data() {
      return {}
    },
    props: {
      shopinfo: {
        type: Object,
        default() { }
      }
    },

    components: {},
    methods: {},
  }
</script>

<style scoped>
  .shoplogo img {
    width: 100px;
    vertical-align: middle;
  }

  .tatlescore {
    display: flex;
    height: 100px;

  }

  .sell,
  .score {
    flex: 1;
  }

  .sell {
    padding-top: 30px;
    text-align: center;
  }

  .score-text {
    margin: 5px 10px;
  }

  .green {
    color: green;
  }

  .red {
    color: red;
  }

  .score-item span:nth-child(2) {
    display: inline-block;
    width: 43px;
  }
</style>